/**
 * @Project Name:oauth2-authentication-server
 * @Package Name:cn.hoofungson.still.oauth2.authentication.server.config
 * @Since JDK 1.8
 */

package cn.hoofungson.blog.authentication.server.config.oauth2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;

/**
 * @Description: RedisTokenStoreConfig
 * @Author 胡松 hoofungson@163.com
 * @Date 2020-01-15 16:51
 * @Version V1.0
 */
@Configuration
public class RedisTokenStoreConfig {

    @Autowired
    private RedisConnectionFactory connectionFactory;

    @Bean
    public RedisTokenStore redisTokenStore() {
        return new RedisTokenStore(connectionFactory);
    }
}
